#ifndef __VECTORND_H__
#define __VECTORND_H__


typedef double ValueType;
typedef struct {
	ValueType *data;
	int size;
}VectorNd;

VectorNd* vectorNd_create(int n, ValueType d[]);
VectorNd* vectorNd_free(VectorNd* vector);

VectorNd* vectorNd_copy(VectorNd* dest, VectorNd* src);


VectorNd* vectorNd_add(VectorNd* a, VectorNd* b, VectorNd* c);
VectorNd* vectorNd_sub(VectorNd* a, VectorNd* b, VectorNd* c);
VectorNd* vectorNd_mul_scalar(VectorNd* a, ValueType k, VectorNd* b);

ValueType vectorNd_dot(VectorNd* a, VectorNd* b);
ValueType vectorNd_cross(VectorNd* a, VectorNd* b);

ValueType vectorNd_norm(VectorNd* a);
VectorNd* vectorNd_normalize(VectorNd* a);

#endif //__VECTORND_H__
